package com.sand.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "withdrawal", schema = "ssh_pro", catalog = "")
public class WithdrawalEntity {
/**
 *
 *
 * @author <achao1441470436@gmail.com>
 * @since 2021/12/2/002 23:54
 */
    private int rid;
    private int userId;
    private Timestamp createTime;
    private int money;
    private String status;
    private String account;

    @Id
    @Column(name = "rid")
    public int getRid() {
        return rid;
    }

    public void setRid(int rid) {
        this.rid = rid;
    }

    @Basic
    @Column(name = "userId")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "createTime")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "money")
    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "account")
    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WithdrawalEntity that = (WithdrawalEntity) o;
        return rid == that.rid && userId == that.userId && money == that.money && Objects.equals(createTime, that.createTime) && Objects.equals(status, that.status) && Objects.equals(account, that.account);
    }

    @Override
    public int hashCode() {
        return Objects.hash(rid, userId, createTime, money, status, account);
    }
}
